/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.mes.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 产品信息实体类
 *
 * @author BladeX
 * @since 2020-09-08
 */
@Data
@TableName("md_material")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PrdInfo对象", description = "产品信息")
public class PrdInfo extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 物料编码（产品编码）
	 */
	@ApiModelProperty(value = "物料编码（产品编码）")
	private String materialNo;
	/**
	 * 内部图号（产品图号）
	 */
	@ApiModelProperty(value = "内部图号（产品图号）")
	private String innerDrawingNo;
	/**
	 * 原始内部图号
	 */
	@ApiModelProperty(value = "原始内部图号")
	private String originalDrawingNo;
	/**
	 * 物料名称（产品名称）
	 */
	@ApiModelProperty(value = "物料名称（产品名称）")
	private String materialName;
//	/**
//	* 主机型id
//	*/
//		@ApiModelProperty(value = "主机型id")
//		@JsonSerialize(nullsUsing = NullSerializer.class)
//		private Long modelId;
	/**
	 * 物料标识：产品-product
	 */
	@ApiModelProperty(value = "物料标识：产品-product")
	private String materialFlag = "P";
	/**
	 * 物料类型（产品类型）
	 */
	@ApiModelProperty(value = "物料类型（产品类型）")
	private String materialType;

	@ApiModelProperty(value = "物料子类型（产品子类型）")
	private String materialSubType;
	/**
	 * 物料组编码
	 */
	@ApiModelProperty(value = "物料组编码")
	private String materialGroupNo;
	/**
	 * 规格
	 */
	@ApiModelProperty(value = "规格")
	private String specifications;
	/**
	 * 型号
	 */
	@ApiModelProperty(value = "型号")
	private String model;
	/**
	 * 计量单位编码
	 */
	@ApiModelProperty(value = "计量单位编码")
	private String unit;
	/**
	 * 版本号
	 */
	@ApiModelProperty(value = "版本号")
	private String version;
	/**
	 * 图纸日期
	 */
	@ApiModelProperty(value = "图纸日期")
	@DateTimeFormat(
		pattern = "yyyy-MM-dd"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd"
	)
	private Date drawingDate;
	/**
	 * 是否BOM（定额标识）
	 */
	@ApiModelProperty(value = "是否BOM（定额标识）1否、2是")
	private String quotaFlag;
	/**
	 * 数据来源
	 */
	@ApiModelProperty(value = "数据来源")
	private String dataSource;
	/**
	 * 产品状态1新建2生产
	 */
	@ApiModelProperty(value = "产品状态")
	private String productStatus;

	@ApiModelProperty(value = "物料内部编码")
	private String innerCode;
	@ApiModelProperty(value = "标箱数量")
	private Integer boxCounts;
	@ApiModelProperty(value = "类别")
	private String category;


	@ApiModelProperty(value = "库区")
	private String warehouseArea;

	@ApiModelProperty(value = "库位")
	private String warehouseLoc;

	@ApiModelProperty("管理方式:1.数量管理,2.条码管理")
	private String managementType;

	@ApiModelProperty(value = "产线id")
	private String productionLineId;
	@ApiModelProperty(value = "产线编码")
	private String productionLineCode;
	@ApiModelProperty(value = "配方号")
	private String formulaNo;


	@ApiModelProperty("条码特征值")
	private String labelCodeEigenvalue;
	@ApiModelProperty("条码特征值1")
	private String labelCodeEigenvalue1;
	@ApiModelProperty("条码特征值2")
	private String labelCodeEigenvalue2;

	/**
	 * 车型
	 */
	@ApiModelProperty(value = "车型")
	private String carModel;
	/**
	 * 检具二维码路径
	 */
	@ApiModelProperty(value = "检具二维码路径")
	private String mouldCode;
	/**
	 * 绑定模具
	 */
	@ApiModelProperty(value = "绑定模具")
	private String mouldName;
	/**
	 * 零件号
	 */
	@ApiModelProperty(value = "零件号")
	private String componentName;
	/**
	 * 理论节拍
	 */
	@ApiModelProperty(value = "理论节拍")
	@JsonSerialize(nullsUsing = NullSerializer.class)
	private BigDecimal pitchTime;

	@ApiModelProperty(value = "产品单价")
	private String productUnitPrice;

	@ApiModelProperty(value = "产品备注")
	private String productRemark;

	@ApiModelProperty(value = "大众库位")
	private String vwpfWarehouseLoc;

	@ApiModelProperty(value = "制造商")
	private String maker;

}
